﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DOM的动态创建.aspx.cs" Inherits="Javascript.DOM.DOM的动态创建" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>无标题页</title>
    <script type="text/javascript">
    function showit()
    {
        var divMain = document.getElementById("divMain");
        var btn = document.createElement("input");
        btn.type = "button";
        btn.value ="我是动态的";
        divMain.appendChild(btn);
    }
    </script>
</head>
<body>
    <div id="divMain"></div>
    <input type="button" value="点我" onclick="ondblclick=showit"/>
</body>
</html>
